<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="vue-2.4.0.js" ></script>
</head>

<body>
       
    <div id="app">
        <ul>
            <!-- 2.0索引放在后面 -->
            <!-- <li v-for="(item,index) in list">{{index}}----{{item}}</li> -->
            <!-- :key=""  代表值唯一性 -->
            <li v-for="(item,index,key) in user " :key="index">{{index}}--{{key}}----{{item}}</li>
        </ul>
    </div>
</body>

<script>
    var vm = new Vue({
        el:'#app',
        data:{
            list:[1,2,3,4,5],
            user:{uname:'itcast',password:'123'},
        },
       
    });

</script>
</html>